package cn.ym.system.domain;

import cn.ym.basic.domain.BaseDomain;
import cn.ym.org.domain.Department;
import cn.ym.org.domain.Employee;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 实体类：菜单
 */
@Data//get、set
@AllArgsConstructor//全参构造
@NoArgsConstructor//无参构造
@ToString//打印
public class Menu  extends BaseDomain {

    //菜单名称
    private String name;
    //菜单组成部分
    private String component;
    //菜单URL
    private String url ;
    //菜单图表
    private String icon;
    //菜单排序
    private Integer index;
    //上级菜单
    private Long parentId;
    private Menu parent;
    //菜单介绍
    private String intro;
    //菜单状态
    private Integer state;
    //获取菜单
    //菜单树最后一级没有数据就不显示
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Menu> children = new ArrayList<>();

}